﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace DARE
{
    public class CCubeEmitterData : CEmitterData
    {
        public Vector3 Cube { get; set; }
        public DARE.CCubeEmitter.ESpawnType SpawnType { get; set; }

        public override void FillDataStructure(object e)
        {
            AEmitter emitter = e as AEmitter;
            base.FillDataStructure(emitter);
            Cube = (emitter as CCubeEmitter).Cube;
            SpawnType = (emitter as CCubeEmitter).SpawnType;
        }

        public override void FillFromDataStructure(out object e, params object[] paramsData)
        {
            base.FillFromDataStructure(out e);
            AEmitter emitter = e as AEmitter;
            (emitter as CCubeEmitter).Cube = Cube;
            (emitter as CCubeEmitter).SpawnType = SpawnType;
        }

        public override AEmitter CreateEmitter()
        {
            return new CCubeEmitter(Name);
        }
    }
}
